#include <iostream>
#include <string>
using namespace std;
class Solution
{
public:
    bool isPalindrome(int x)
    {
        string str = to_string(x);
        int i = 0;
        int j = str.length() - 1;
        while (i <= j)
        {
            if (str[i] != str[j])
                return false;
            i++;
            j--;
        }
        return true;
    }
};
int main()
{
    Solution *s = new Solution();

    bool ans = s->isPalindrome(121);
    cout << "hello world" << endl;
    cout << ans << endl;
    return 0;
}